<?php $this->headTitle('Table List'); ?>
<?php $this->headLink()->appendStylesheet($this->asset('css/crud.css')); ?>
<?php $this->headLink()->appendStylesheet($this->asset('css/crud_ie.css'), null, 'IE'); ?>

<?php if (!empty($this->useOwnLayout) || !$this->hasLayout()) echo $this->render('_partials/head.phtml'); ?>

<div id="crud">

<div class="box">
<div class="panel">
    <div class="corners-top"><div class="left"></div><div class="right"></div></div>
    <div class="content">

<?php if (!empty($this->messages)) : ?>
<div id="crud-messages">
    <p>
    <?php echo implode("</p>\n<p>", $this->messages); ?>
    </p>
</div>
<?php endif; ?>

<div class="column">
<h2>Tables in the current database:</h2>
<ul id="db-tables">
<?php foreach ($this->tables as $table) : ?>
    <li><a href="<?php echo $this->url(array('action'=>'list', 'table'=>$table)) ?>"><?php echo $this->inflect($table)->toPhrase(Crud_View_Helper_Inflect::UC_FIRST) ?></a></li>
<?php endforeach ?>
<?php if (!$this->tables) : ?>
    <li>There are no tables in the database.</li>
<?php endif ?>
</ul>
</div>

<div class="column">

<?php echo $this->dbForm->renderForm(false); ?>
    <fieldset>
        <legend>Set Zend_Db adapter</legend>
        <p>Currently using <?php echo $this->curAdapter; ?></p>
        <dl>
            <dt><?php echo $this->dbForm->adapter->renderLabel(); ?></dt>
            <dd><?php echo $this->dbForm->adapter->renderViewHelper(); ?></dd>
            <dd><?php echo $this->dbForm->adapter->renderErrors(); ?></dd>
        </dl>
        <dl>
            <dt><?php echo $this->dbForm->dbname->renderLabel(); ?>
            For SQLite, enter the path to the database file relative to the document root
            or preferably, the absolute path. The directory must be writable by the server.
            </dt>
            <dd><?php echo $this->dbForm->dbname->renderViewHelper(); ?></dd>
            <dd><?php echo $this->dbForm->dbname->renderErrors(); ?></dd>
        </dl>
        <dl>
            <dt><?php echo $this->dbForm->host->renderLabel(); ?></dt>
            <dd><?php echo $this->dbForm->host->renderViewHelper(); ?></dd>
            <dd><?php echo $this->dbForm->host->renderErrors(); ?></dd>
        </dl>
        <dl>
            <dt><?php echo $this->dbForm->port->renderLabel(); ?></dt>
            <dd><?php echo $this->dbForm->port->renderViewHelper(); ?></dd>
            <dd><?php echo $this->dbForm->port->renderErrors(); ?></dd>
        </dl>
        <dl>
            <dt><?php echo $this->dbForm->username->renderLabel(); ?></dt>
            <dd><?php echo $this->dbForm->username->renderViewHelper(); ?></dd>
            <dd><?php echo $this->dbForm->username->renderErrors(); ?></dd>
        </dl>
        <dl>
            <dt><?php echo $this->dbForm->password->renderLabel(); ?></dt>
            <dd><?php echo $this->dbForm->password->renderViewHelper(); ?></dd>
            <dd><?php echo $this->dbForm->password->renderErrors(); ?></dd>
        </dl>
        <dl>
            <dd>
                <?php echo $this->dbForm->submit->renderViewHelper(); ?>
                <?php echo $this->dbForm->useDefault->renderViewHelper(); ?>
                <?php echo $this->dbForm->useConfig->renderViewHelper(); ?>
            </dd>
        </dl>
    </fieldset>
</form>

<?php echo $this->queryForm->renderForm(false); ?>
    <fieldset>
        <legend>Execute query</legend>
        <dl>
            <dt><?php echo $this->queryForm->query->renderLabel(); ?></dt>
            <dd><?php echo $this->queryForm->query->renderViewHelper(); ?></dd>
            <dd><?php echo $this->queryForm->query->renderErrors(); ?></dd>
        </dl>
        <dl>
            <dd><?php echo $this->queryForm->submit->renderViewHelper(); ?></dd>
        </dl>
    </fieldset>
</form>
</div>

<div class="cleared"></div>

    </div>
    <div class="corners-bottom"><div class="left"></div><div class="right"></div></div>
</div></div>

</div>

<!-- crud/index/index: $Id: index.phtml 54 2009-12-20 03:00:49Z monzee@gmail.com $ -->

<?php if (!empty($this->useOwnLayout) || !$this->hasLayout()) echo $this->render('_partials/foot.phtml'); ?>
